// MFCRichEdit.cpp : implementation file
//

#include "stdafx.h"
#include "Test_ArtSplitterWnd.h"
#include "MFCRichEdit.h"


// CMFCRichEdit

IMPLEMENT_DYNCREATE(CMFCRichEdit, CRichEditView)

CMFCRichEdit::CMFCRichEdit()
{

}

CMFCRichEdit::~CMFCRichEdit()
{
}

BEGIN_MESSAGE_MAP(CMFCRichEdit, CRichEditView)
END_MESSAGE_MAP()


// CMFCRichEdit diagnostics

#ifdef _DEBUG
void CMFCRichEdit::AssertValid() const
{
	CRichEditView::AssertValid();
}

#ifndef _WIN32_WCE
void CMFCRichEdit::Dump(CDumpContext& dc) const
{
	CRichEditView::Dump(dc);
}
#endif
#endif //_DEBUG


// CMFCRichEdit message handlers

HRESULT STDMETHODCALLTYPE CMFCRichEdit::CreateWnd(IGenericPanel *pParent, HWND hWndParent)
{
	CWnd *pWnd = (CWnd*)this;
	CWnd *wndParent = CWnd::FromHandle(hWndParent);
	CRect _Rect(0,0, 100, 100);
	//WS_HSCROLL|WS_VSCROLL|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_VISIBLE|ES_MULTILINE|ES_AUTOHSCROLL|ES_LEFT,
	if (pWnd->Create(NULL,	_T(""),
		WS_HSCROLL|WS_VSCROLL|WS_CHILD|WS_VISIBLE|ES_LEFT|ES_MULTILINE|ES_WANTRETURN,
		_Rect, wndParent, 0))
	{
		//this->GetEditCtrl().SetLimitText(100);
		::SendMessage(m_hWnd, WM_SETFONT, (WPARAM)::GetStockObject(DEFAULT_GUI_FONT), 0);
		return S_OK;
	}
}

